﻿using System.ComponentModel.DataAnnotations;
using System.Xml.Serialization;

namespace SelfService.XinXing.Models
{
    [XmlRoot("Request")]
    public class HisGetPatientCardNoRequest : HisRequestBase
    {
        /// <summary>
        /// 传入数据
        /// </summary>
        [Required]
        [XmlElement("data")]
        public string Data { get; set; }

        [Required]
        [XmlElement("type")]
        public HisGetPatientInfoRequestType Type { get; set; }
    }

    [XmlRoot("Request")]
    public class HisGetPatientInfoRequest : HisRequestBase
    {
        /// <summary>
        /// 患者姓名
        /// </summary>
        [XmlElement("patientname")]
        public string PatientName { get; set; }

        /// <summary>
        /// 患者ID
        /// </summary>
        [XmlElement("patientid")]
        public string PatientId { get; set; }

        /// <summary>
        /// 身份证号码
        /// </summary>
        [XmlElement("idno")]
        public string IdCardNo { get; set; }

        /// <summary>
        /// 就诊卡号
        /// </summary>
        [XmlElement("cardno")]
        public string CardNo { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        [XmlElement("phone")]
        public string Phone { get; set; }

        /// <summary>
        /// 身份证UID
        /// </summary>
        [XmlElement("cardserno")]
        public string Uid { get; set; }

        /// <summary>
        /// 社保卡号
        /// </summary>
        [XmlElement("ybcardseq")]
        public string SheBaoNo { get; set; }

        /// <summary>
        /// 监护人身份证号码
        /// </summary>
        [XmlElement("guardianidno")]
        public string GuardianNo { get; set; }

        /// <summary>
        /// 电子卡号
        /// </summary>
        [Required]
        [XmlElement("electroncardno")]
        public string ElectronCardNo { get; set; }

        /// <summary>
        /// 患者主索引
        /// </summary>
        [Required]
        [XmlElement("patientindex")]
        public string PatientIndex { get; set; }
    }




    public enum HisGetPatientInfoRequestType
    {
        [XmlEnum("2")]
        身份证id = 2,
        [XmlEnum("4")]
        医保卡号 = 4,
        [XmlEnum("5")]
        身份证号 = 5,
        [XmlEnum("6")]
        社保卡id = 6,
        [XmlEnum("7")]
        电子健康卡id = 7
    }
}
